import request from '@/config/axios'

// 线下店订单 VO
export interface BundleVO {
  id: number // 编号
  storeId: number // 店铺编号
  description: string // 套餐说明
  title: string // 套餐标题
  status: number // 状态
}

// 线下店订单 API
export const BundleApi = {
  // 查询线下店订单分页
  getBundlePage: async (params: any) => {
    return await request.get({ url: `/store/bundle/page`, params })
  },

  // 查询线下店订单详情
  getBundle: async (id: number) => {
    return await request.get({ url: `/store/bundle/get?id=` + id })
  },

  // 新增线下店订单
  createBundle: async (data: BundleVO) => {
    return await request.post({ url: `/store/bundle/create`, data })
  },

  // 修改线下店订单
  updateBundle: async (data: BundleVO) => {
    return await request.put({ url: `/store/bundle/update`, data })
  },

  // 删除线下店订单
  deleteBundle: async (id: number) => {
    return await request.delete({ url: `/store/bundle/delete?id=` + id })
  },

  // 导出线下店订单 Excel
  exportBundle: async (params) => {
    return await request.download({ url: `/store/bundle/export-excel`, params })
  },
}